package part08_外观模式_家庭影院;

/**
 * @ClassName: DVDPlayer
 * @Author: AllenSun
 * @Date: 2020/3/2 21:50
 */
public class DVDPlayer {
    //使用一个单例模式（饿汉式）
    private static DVDPlayer instance=new DVDPlayer();

    public static DVDPlayer getInstance(){
        return instance;
    }

    /**
     * @MethodName: on
     * @Author: AllenSun
     * @Date: 2020/3/2 21:51
     */
    public void on(){
        System.out.println("DVD打开");
    }
    /**
     * @MethodName: off
     * @Author: AllenSun
     * @Date: 2020/3/2 21:55
     */
    public void off(){
        System.out.println("DVD关闭");
    }

    /**
     * @MethodName: play
     * @Author: AllenSun
     * @Date: 2020/3/2 21:56
     */
    public void play(){
        System.out.println("DVD播放");
    }

    /**
     * @MethodName: pause
     * @Author: AllenSun
     * @Date: 2020/3/2 22:10
     */
    public void pause(){
        System.out.println("DVD暂停");
    }
}
